<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择地址_{$webname}</title>
<meta name='keywords'    content='{$keywords}'>
<meta name='description' content='{$description}'>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_address.css" />
<!--页面样式结束-->
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery.SuperSlide.2.1.1.js"></script>
</head>

<body>
<div class="zhezhao"></div>
<div class="zz">
	<!--top start-->
	<include file="Public:header" lang="true" />
	<!--top end-->
	<!--content start-->
	<div class="content">
		<div class="buzou clearfix">
			<div class="buzou_left clearfix">
				<dl class="hover">
					<dt>1.选择地址</dt>
					<dd><a href="{:U('Index/address')}"></a></dd>
				</dl>
				<dl>
					<dt>2.选择餐厅</dt>
					<notempty name="city.adds">
						<dd><a href="{:U('Restaurant/index')}"></a></dd>
					<else />
						<dd><a ></a></dd>
					</notempty>
				</dl>
				<dl>
					<dt>3.选择菜品</dt>
					<dd><a ></a></dd>
				</dl>
				<dl>
					<dt>4.确认订单</dt>
					<dd><a ></a></dd>
				</dl>
				<dl>
					<dt>5.下单成功</dt>
					<dd><a ></a></dd>
				</dl>
			</div>
			<div class="buzou_right">
				<a href="http://vipwebchat.tq.cn/pageinfo.jsp?version=vip&admiuin=9632675&ltype=100&iscallback=0&page_templete_id=79615&is_message_sms=0&is_send_mail=0&action=acd&acd=1&type_code=1" target=_blank><img src="http://float2006.tq.cn/staticimg.jsp?version=vip&admiuin=9632675&ltype=100&action=acd&acd=1&type_code=1&onlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411565972.png&offlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411628431.png" border='0' /></a>
				<!--  <img src="{$NOW_THEME_URL}/Assets/Images/livechat.png">-->
			</div>
		</div>
		<!--address start-->
		<div class="address">
			<h1 class="color_main">您所选择的城市：<em>{$city.zhcity}
			<!-- <notempty name="city.adds">
				</em><br/>系统检测到您所在的位置 :<em id="address"> {$city.adds}</em>
			</notempty> -->
			</h1>
			<!--<h2>Please enter the first few phonetic alphabet of your hotel,  residential apartment building or road names, and then you can select from a drop-down menu.</h2>-->
			<div class="address_btn">
				<!-- <php>if($city['pointlng']&&$city['adds']){</php>
					<span class="sure"><a href="{:U('Restaurant/index')}">选择正确的地址</a></span>
				<php>}</php> -->
				<span class="incorrect incorrect1" id="incorrect1">选择常用地址</span>
				<span class="incorrect incorrect2" id="incorrect2">
					<a href="{:U('Url/lbs')}" target="aa">通过地图选择地址</a>
				</span>
				 <span class="incorrect" id="incorrect3">
					<a href="{:U('Index/index')}">返回选择城市</a>
				</span>
			</div>
			<div class="iframe">
				<iframe src="{:U('Url/lbs')}" name="aa" frameborder="0" scrolling="No" noresize="noresize" id="topFrame" width="100%" height="350"></iframe>
			</div>
			<h3 class="addressin">
				<span style="font-size:12px">温馨提示：请输入您所在的小区、公寓楼、酒店或路名的前几个字母，再从下拉选项中选取即可。</span><br/>
				<input id="" type="text" placeholder="请输入小区名或路名，例如：利雅湾，或 liyawan" class="addressinput"  autocomplete="off" onKeyUp="showAddress()" />
				<span class="noaddress"></span>
			</h3>
			<div class="addressdl">
				<dl style='font-size:13px;'>
					<dd><span></span></dd>
					<dd class="ditu"><img src="{$NOW_THEME_URL}/Assets/Images/ditusearch.png"/><em></em></dd>
				</dl>
			</div>
			<div class="address_choose">
				<p>您选择了:</p>
				<p><em>地址:</em><span class="addressspan"></span></p>
				<input type="hidden" id="addid" class="addid" value=""/>
				<h3>如果这是正确的, 请点击"确定"按钮</h3>
				<a id="href_1" class="bg_main">确定</a>
			</div>
		</div>
		<!--address end-->
	</div>
	<!--content end-->
	
	<!--footer start-->
	<include file="Public:footer" lang="true" />
	<!--footer end-->
</div>
<div class="cityck">
	<h1>您还没有选择正确的地址，点击该按钮来选择地址</h1>
	<h3><a href="{:U('Index/index')}" class="ck">去选择城市</a></h3>
</div>	
<script type="text/javascript">
	//返回顶部
	$(window).on('scroll',function(){
		var scrollTop = $(document).scrollTop();
	});
	
	$(function(){		
		//悬浮框显示隐藏
		$('.online').on('hover',function(){
			$('.online ul').toggle();
			//$('.rlico').toggleClass('rlico2');
		});
		
		<notempty name="noneCity">
			$('.cityck').show();
			$('.zhezhao').show();
		</notempty>
		
		$('.addressin').show();
		
		//弹出地址输入框
		$('.incorrect1').on('click',function(){
			var ads = $('.addressinput').val();
			
			if(ads){
				$('.address_choose').show();
			}
			$('.addressin').show();
			$('.iframe').hide();
		});
		
		//弹出地图
		$('.incorrect2').live('click',function(){
			$('#incorrect1').show();
			$('.iframe').show();
			$('.addressin').hide();
			$('.addressdl').hide();
			$('.address_choose').hide();
		});
		
		$("#href_1").on('click',function(){
			var adds  = $('.addressspan').html();
			var addid = $('#addid').val();
			
			$.get("{:U('Index/adds')}",{adds:adds,addid:addid},function(){
				window.location.href="index.php?s=Restaurant/index";
			});
		});	
	});
	
	function showAddress(){
		var value = $('.addressinput').val();
		if(value){
			$.get("{:U('Index/address')}",{value:value},function(data){
				
				if(data){
					$('.noaddress').html("");
					$('.addressdl dl').html(data);
					$('.addressdl').slideDown();
					
					$('.addressdl dl dd span').click(function(){
						var html  = $(this).text();
						var addid = $(this).attr("did"); 

						$('.addressinput').val(html);
						$('.addressspan').html(html);
						$('.addid').val(addid);
						
						$('.addressdl').slideUp(function(){
							$('.address_choose').slideDown();
						});
					});
				}else{
					
					//var btn  = "<span class=\"incorrect incorrect2\"  id=\"incorrect2\"><a href=\"{:U('Url/lbs')}\" target=\"aa\">通过地图选择地址</a></span>";
					var html = "抱歉，您的地址暂时没有找到。您可以尝试减少关键词，只输入您地址关键词中的两三个字。例如：假如您的地址是 北京市朝阳区建国门南大街1-2号雅诗阁来福士公寓1105房，您可以在左框中输入“雅诗阁”三个字，那么系统会给出2个包含雅诗阁的地址，您点击选择正确的一个就可以了。如仍然行不通，可点击右上方“在线支持”按钮，或者拨打4000201717获得客服支持。";
					$('.noaddress').html(html);
					$('.addressdl').slideUp();
					$('.address_choose').slideUp();
				}
			});
		}else{
			$('.addressdl').slideUp();
			return false;
		}
	}
</script>
</body>
</html>
